home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Multimedia & Desktop / sk8 / SK8InJava / Code / Actors / RoundRect.java < prev    next >
Encoding:
Java Source  |  1997-02-27  |  1.0 KB  |  43 lines  |  [TEXT/CWIE]

  1. /*  SK8 © 1997 Apple Computer, Inc.
  2.     This code is protected under the current SK8 License
  3.     See http://sk8.research.apple.com/ for more information
  4.     Apple Research Laboratories
  5. */
  6.  
  7. import java.awt.*;
  8.  
  9. class roundrect extends actor {
  10.     int roundednessVar = 10;
  11.     
  12.     public int roundedness() {
  13.         return roundednessVar;
  14.     }
  15.     public void setroundedness(int r) {
  16.         roundednessVar = r;
  17.     }
  18.  
  19.     //The following code is pending the definition of 
  20.     //Region.setRoundRectRegion(), a function to create a rounded
  21.     //rectangular region.
  22.     
  23. /* 
  24.     public Region boundsregion() {
  25.         Region reg = new Region();
  26.         Rectangle myBR = boundsrect(true);
  27.         reg.setRoundRectRegion(myBR.x, myBR.y, myBR.width, myBR.height, roundednessVar);
  28.         return reg;
  29.     }
  30.     
  31.     public Region fillregion() {
  32.         Region reg = new Region();
  33.         Rectangle myBR = boundsrect(true);
  34.         myBR.x += framesizeVar;
  35.         myBR.y += framesizeVar;
  36.         myBR.width -= 2 * framesizeVar;
  37.         myBR.height -= 2 * framesizeVar;
  38.         reg.setRoundRectRegion(myBR.x, myBR.y, myBR.width, myBR.height, roundednessVar);
  39.         return reg;
  40.     }
  41. */
  42.  
  43. }